package com.ruoyi.warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.warehouse.mapper.DrugWarehouseStockMapper;
import com.ruoyi.warehouse.domain.DrugWarehouseStock;
import com.ruoyi.warehouse.service.IDrugWarehouseStockService;

/**
 * 药品量管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-22
 */
@Service
public class DrugWarehouseStockServiceImpl implements IDrugWarehouseStockService 
{
    @Autowired
    private DrugWarehouseStockMapper drugWarehouseStockMapper;

    /**
     * 查询药品量管理
     * 
     * @param stockId 药品量管理主键
     * @return 药品量管理
     */
    @Override
    public DrugWarehouseStock selectDrugWarehouseStockByStockId(Long stockId)
    {
        return drugWarehouseStockMapper.selectDrugWarehouseStockByStockId(stockId);
    }

    /**
     * 查询药品量管理列表
     * 
     * @param drugWarehouseStock 药品量管理
     * @return 药品量管理
     */
    @Override
    public List<DrugWarehouseStock> selectDrugWarehouseStockList(DrugWarehouseStock drugWarehouseStock)
    {
        return drugWarehouseStockMapper.selectDrugWarehouseStockList(drugWarehouseStock);
    }

    /**
     * 新增药品量管理
     * 
     * @param drugWarehouseStock 药品量管理
     * @return 结果
     */
    @Override
    public int insertDrugWarehouseStock(DrugWarehouseStock drugWarehouseStock)
    {
        return drugWarehouseStockMapper.insertDrugWarehouseStock(drugWarehouseStock);
    }

    /**
     * 修改药品量管理
     * 
     * @param drugWarehouseStock 药品量管理
     * @return 结果
     */
    @Override
    public int updateDrugWarehouseStock(DrugWarehouseStock drugWarehouseStock)
    {
        return drugWarehouseStockMapper.updateDrugWarehouseStock(drugWarehouseStock);
    }

    /**
     * 批量删除药品量管理
     * 
     * @param stockIds 需要删除的药品量管理主键
     * @return 结果
     */
    @Override
    public int deleteDrugWarehouseStockByStockIds(Long[] stockIds)
    {
        return drugWarehouseStockMapper.deleteDrugWarehouseStockByStockIds(stockIds);
    }

    /**
     * 删除药品量管理信息
     * 
     * @param stockId 药品量管理主键
     * @return 结果
     */
    @Override
    public int deleteDrugWarehouseStockByStockId(Long stockId)
    {
        return drugWarehouseStockMapper.deleteDrugWarehouseStockByStockId(stockId);
    }
}
